﻿<%@ Page Title="" Language="C#" Theme="POSSystem" MasterPageFile="~/EditPages/Popup.Master"
    AutoEventWireup="true" CodeBehind="SalePopup.aspx.cs" Inherits="WebUI.EditPages.SalePopup" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<%@ Register Src="~/Controls/POSControls/SalesCtrl.ascx" TagName="Sales" TagPrefix="uc" %>
<%@ Register Src="~/Controls/POSControls/SaleLookup.ascx" TagName="SaleLookup" TagPrefix="uc" %>
<%@ Register Src="~/Controls/POSControls/OrderItemsCtrl.ascx" TagName="OrderItems" TagPrefix="uc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PopupHeadHolder" runat="server">
    <script type="text/javascript">
        function showOrderItems() {
            var div = document.getElementById("divItems");
            div.style.display = "block";
        }

        function hideOrderItems() {
            var div = document.getElementById("divItems");
            div.style.display = "none";
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PopupToolbarHolder" runat="server">
    <table class="popuptoolbar" width="100%">
        <tr>
            <td style="vertical-align: middle; text-align: left">
                <asp:LinkButton class="tbbutton" ID="btnNew" runat="server" OnClientClick="window.close(); return false;">
                    <img src="Images/CloseButton.gif" /><asp:Label ID="label2" runat="server" Text="Close"></asp:Label>
                </asp:LinkButton>
                <asp:LinkButton class="tbbutton" ID="btnShowOrderItem" runat="server" OnClientClick="showOrderItems(); return false;">
                    <img src="Images/visible.gif" /><asp:Label ID="label3" runat="server" Text="Show Order Items"></asp:Label>
                </asp:LinkButton>
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PopupContentHolder" runat="server">
    <asp:Panel ID="printContent" runat="server" Style='overflow-y: scroll; overflow-x: hidden;
        height: 540px; width: 100%'>
        <table width="100%">
            <tr>
                <td style="width: 75%; text-align: left; vertical-align: top">
                    <asp:Panel ID="panelProduct" runat="server" class="primaryPanel">
                        <div class="titleBar">
                            <asp:Label ID="Label4" runat="server" CssClass="titleContent">Sales</asp:Label>
                        </div>
                        <div class="primaryFrameNoBorder">
                            <asp:UpdatePanel ID="updateSales" runat="server" UpdateMode="Conditional">
                                <ContentTemplate>
                                    <uc:Sales ID="sales" runat="server" ShowNewInvoice="false"></uc:Sales>
                                    <asp:UpdatePanel ID="updateErr" runat="server" UpdateMode="Conditional">
                                        <ContentTemplate>
                                            <asp:Panel ID="panelErr" runat="server">
                                            </asp:Panel>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                    </asp:Panel>
                </td>
                <td style="text-align: left; vertical-align: top">
                    <asp:Panel ID="panel1" runat="server" class="primaryPanel">
                        <div class="titleBar">
                            <asp:Label ID="Label1" runat="server" CssClass="titleContent">Product Lookup</asp:Label>
                        </div>
                        <div class="primaryFrameNoBorder">
                            <asp:UpdatePanel ID="updateLookup" runat="server" UpdateMode="Conditional">
                                <ContentTemplate>
                                    <uc:SaleLookup ID="saleLookup" runat="server"></uc:SaleLookup>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                    </asp:Panel>
                </td>
            </tr>
        </table>
    </asp:Panel>
    <div id="divItems" class="popupItems" >
        <div style="text-align:right; width:100%">
            <asp:LinkButton class="tbbutton" ID="LinkButton1" runat="server" OnClientClick="hideOrderItems(); return false;">
                <img src="Images/CloseButton.gif" /><asp:Label ID="label5" runat="server" Text="Close"></asp:Label>
            </asp:LinkButton>
        </div>
        <div style="height:4px" > &nbsp; </div>
        <uc:OrderItems Width="100%" ID="gridSelectedItems" runat="server" AllowPaging="false"
            AllowSelecting="true" AllowSorting="false" ShowFooter="false" ReadOnly="true" />
    </div>
</asp:Content>
